import service from '@/utils/crmRequest'

export default () => ({
  // 创建
  DEPOSIT_CREATE: (data) => {
    return service({
      url: '/api/margin/create',
      method: 'post',
      data
    })
  },
  // 编辑
  DEPOSIT_UPDATE: (data) => {
    return service({
      url: '/api/deposit/update',
      method: 'put',
      data
    })
  },
  // 删除
  DEPOSIT_DELETE: (id) => {
    return service({
      url: '/api/margin/delete',
      method: 'delete',

    })
  },
  // 市场准入
  DEPOSIT_LIST: (params) => {
    return service({
      url: '/api/margin/list',
      method: 'post',
      params
    })
  },
  // 市场准入详情
  DEPOSIT_DETAIL: (id) => {
    return service({
      url: '/api/margin/detail',
      method: 'get',
    })
  },
  //   代理 兼职 下选择列表
  DEPOSIT_AGENTS: (params) => {
    return service({
      url: '/api/agent/list',
      method: 'get',
      params,
    })
  }
})
